#include<bits/stdc++.h>
using namespace std;
string a,b;
int c[10000],d[10000],e[10000],x,lenc=1;
int main(){
	cout << "高精度加法:  " << endl;
	cout << "加数A:  ";
	getline(cin,a);
	for(int i=0;i < a.size();i++){
		c[a.size() - i] = a[i] - '0';
	}
	cout << "加数B:  ";
	getline(cin,b);
	for(int i=0;i < b.size();i++){
		d[b.size() - i] = b[i] - '0';
	}
	cout << "和:  ";
	while(lenc <= a.size() || lenc <= b.size()){
		e[lenc] = c[lenc] + d[lenc] + x;
		x = e[lenc] / 10;
		e[lenc] %= 10;
		lenc++; 
	}
	e[lenc] = x;
	while(lenc > 1 && e[lenc] == 0) lenc--;
	for(int i=lenc;i >= 1;i--) cout << e[i];
	cout << endl;
	return 0;
}